plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.1'
    id 'io.spring.dependency-management' version '1.1.4'
}

group = 'tgc.plus'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }

    all {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
        exclude module: "spring-boot-starter-logging"
        exclude module: "logback-classic"
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
    implementation group: 'io.r2dbc', name: 'r2dbc-bom', version: 'Borca-SR2', ext: 'pom'
    testImplementation group: 'io.r2dbc', name: 'r2dbc-h2', version: '1.0.0.RELEASE'
    implementation group: 'org.postgresql', name: 'r2dbc-postgresql', version: '1.0.4.RELEASE'
    implementation group: 'io.r2dbc', name: 'r2dbc-pool', version: '1.0.1.RELEASE'
    implementation group: 'io.r2dbc', name: 'r2dbc-spi', version: '1.0.0.RELEASE'

    implementation 'org.springframework.kafka:spring-kafka'
    implementation group: 'io.projectreactor.kafka', name: 'reactor-kafka', version: '1.3.22'
    implementation group: 'io.projectreactor.addons', name: 'reactor-extra', version: '3.5.1'
    implementation group: 'io.projectreactor', name: 'reactor-core', version: '3.6.2'


    implementation 'org.jetbrains:annotations:24.0.0'
    testImplementation 'org.projectlombok:lombok:1.18.26'
    testImplementation 'org.projectlombok:lombok:1.18.26'
    compileOnly 'org.projectlombok:lombok'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    runtimeOnly 'org.postgresql:postgresql'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'io.projectreactor:reactor-test'
    testImplementation 'org.springframework.kafka:spring-kafka-test'
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version: '3.1.5'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.16.1'
    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.16.1'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1'
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '3.2.1'
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: '3.2.1'
    implementation group: 'org.flywaydb', name: 'flyway-core', version: '10.8.1'
    runtimeOnly group: 'org.flywaydb', name: 'flyway-database-postgresql', version: '10.8.1'


    //metrics
    //testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.2'
    //implementation group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: '1.12.4'
    //implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '3.2.3'



}

//tasks.named('test') {
//    useJUnitPlatform()
//}